package com.ruoyi.common.enums;

import lombok.Getter;

@Getter
public enum OrderStatusEnum {
    not("not_exist", "订单不存在"),
    notHandle("not_handle", "未处理"),
    handling("handling", "处理中"),
    reject("reject", "驳回"),
    timeOut("timeout", "超时"),
    success("success", "成功");


    private String value;
    private String text;

    OrderStatusEnum(String value, String text) {
        this.value = value;

        this.text = text;
    }

    public static String toMsg(String value) {
        for (OrderStatusEnum wot : OrderStatusEnum.values()) {
            if (wot.getValue().equals(value)) {
                return wot.getText();
            }
        }
        return "";
    }


}
